package com.kw.model.weixin.entry;

public enum WeiXinMsgType {
	TEXT,IMAGE,LOCATION,LINK,EVENT;
	
	public static WeiXinMsgType getWeiXinMsgType(String type){
		if(type!=null)
		    if("text".equals(type.toLowerCase()))
		    	return WeiXinMsgType.TEXT;
		    else if("image".equals(type.toLowerCase()))
		    	return WeiXinMsgType.IMAGE;
		    else if("location".equals(type.toLowerCase()))
		    	return WeiXinMsgType.LOCATION;
		    else if("link".equals(type.toLowerCase()))
		    	return WeiXinMsgType.LINK;
		    else if("event".equals(type.toLowerCase()))
		    	return WeiXinMsgType.EVENT;
		    else 
		    	return null;
		else
			return null;
	}
}
